<?php
@header("Content-type:text/html;charset=GB2312");
defined('BASEPATH') OR exit('No direct script access allowed');

class Admin extends CI_Controller
{
    function index(){
        $my = $this->load->database('default', TRUE);
        $ms = $this->load->database('sqlserver', TRUE);

        $sql = "select * from NC_Admin";
        $msq = $ms->query($sql)->result_array();
        $m = array();
        foreach($msq as $v){
            $k = array(
                'id'=> $v['id'],
                'username'=> $v['username'],
                'password'=> $v['password'],
                'status'=> $v['status'],
                'AdminGrade'=> $v['AdminGrade'],
                'Adminflag'=> $v['Adminflag'],
                'LoginTime'=> $v['LoginTime'],
                'Loginip'=> $v['Loginip'],
                'isLock'=> $v['isLock'],
                'RandomCode'=> $v['RandomCode'],
                'isAloneLogin'=> $v['isAloneLogin'],
            );
            $m[] = $k;
        }
        var_dump("<pre>");
        var_dump($m);
    }
}